# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-cxxheaderparser
_pkgname=cxxheaderparser
pkgver=1.6.0
pkgrel=2
pkgdesc='Parse C++ header files and generate a data structure representing the class.'
arch=('any')
url='https://pypi.org/project/cxxheaderparser/#files'
license=('BSD-3-Clause')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('5bb2fe483dcc9e9984b6efe14a383f06cdec1abc3883643ed789add05386bdd217cbc565d549e031028255138e79a30e534db29c4e2ae81c650c489882de8a18')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

